<template>
  <div class="container">
    <div class="content">

      <div class="title" v-if="video.length>0">
        <span class="iconfont icon-shipin"></span>
        <span>创意视频</span>
      </div>
      <videolist :miva="video"></videolist>

      <div class="title" v-if="html5.length>0">
        <span class="iconfont icon-icon-- "></span>
        <span>互动H5</span>
      </div>
      <interactList :miva="html5"></interactList>

      <div class="title" v-if="poster.length>0">
        <span class="iconfont icon-tupian "></span>
        <span>创意海报</span>
      </div>
      <poster :miva="poster"></poster>

      <div class="title" v-if="longPic.length>0">
        <span class="iconfont icon-dongman "></span>
        <span>动漫长图</span>
      </div>
      <longPic :miva="longPic"></longPic>

      <topic></topic>
      <random></random>
    </div>
  </div>

</template>

<script>
/* eslint-disable */
import videolist from "@/components/videoList";
import interactList from "@/components/InteractList";
import topic from "@/components/topic";
import random from "@/components/random";
import poster from "@/components/posterList";
import longPic from "@/components/longPic";

export default {
  components: {
    videolist,
    interactList,
    topic,
    random,
    poster,
    longPic
  },
  data() {
    return {
      show: false
    };
  },
  computed: {
    searchData() {
      return this.$store.state.searchData;
    },
    html5() {
      const arr = [];
      for (const val of this.searchData) {
        if (val.type == 1) {
          arr.push(val);
        }
      }
      return arr;
    },
    longPic() {
      const arr = [];
      for (const val of this.searchData) {
        if (val.type == 2) {
          arr.push(val);
        }
      }
      return arr;
    },
    poster() {
      const arr = [];
      for (const val of this.searchData) {
        if (val.type == 3) {
          arr.push(val);
        }
      }
      return arr;
    },
    video() {
      const arr = [];
      for (const val of this.searchData) {
        if (val.type == 4) {
          arr.push(val);
        }
      }
      return arr;
    }
  }
};
</script>

<style lang="less">
.container {
  background: #fff;

  .content {
    max-width: 1200px;
    margin: 5px auto;
    font-size: 24px;
    .icon-shipin,
    .icon-tupian,
    .icon-dongman {
      font-size: 22px;
    }
    .icon-icon-- {
      font-size: 32px;
    }

    .iconfont {
      // font-size:18px;
      padding-right: 10px;
    }
  }
}
</style>